<template>
    <Tabs v-model="currentTab" class="demo-tabs-style2"> 
        <TabPane label="竞赛选手管理" name = "user">
            <component-user ref="userCompet"></component-user>
        </TabPane>
        <TabPane label="竞赛题目管理" name="question">
            <component-question ref="quesCompet"></component-question>
        </TabPane>
    </Tabs>
</template>

<script>
    import componentUser from './kcCompetPublic/componentUser'
    import componentQuestion from './kcCompetPublic/componentQuestion'

	export default {
		name: "knowledgePreManage",
        components:{componentUser,componentQuestion},
        data(){
            return {
                currentTab:'user',
            }
        },
        watch: {
            currentTab(val) {
                switch (val) {
                    case 'user': 
                        this.$refs.userCompet.resetQuery()
                        break;
                    case 'question': 
                        this.$refs.quesCompet.resetQuery()
                        break;
                }
            }
        }
	}
</script>

<style scoped>

</style>
